package dq.study.designmodel.iteator;

/**
 * @author dongqun
 * @Description:
 * @date 2019/3/13 22:21
 */
public class Client {

    public static void main(String[] args) {
        //Collection<String> c = new ArrayList<String>();
        Collection<String> c = new LinkedList<String>();
        for (int i = 0; i < 15; i++) {
            c.add(String.valueOf(i));
        }
        System.out.println("-------------");
        Iterator<String> it = c.iterator();
        while (it.hasNext()) {
            System.out.print(it.next() + "-");
        }
    }

}
